.container
  .row
    table.table.table-hover.table-striped.table-condensed
      tr
          th Builder Name
          th Builds
          th
            span(ng-init="help=false", ng-click="help=!help")
                i.fa.fa-question-circle(style="position:relative")
                    .popover.bottom.anim-popover(ng-if="help",
                       style="display:block;min-width:600px;left:-300px;top:30px")
                        h5.popover-title
                            | Tags filtering
                        .popover-content
                            p
                              b
                                  pre +{tag}
                              | all tags with '+' must be present in the builder tags
                            p
                              b
                                  pre -{tag}
                              | no tags with '-' must be present in the builder tags
                            p
                              b
                                  pre {tag}
                              | at least one of the filtered tag should be present
                            p url bar is updated with you filter configuration, so you can bookmark your filters!
                        .arrow
            span(ng-show="tags_filter.length==0") Tags
            span(ng-show="tags_filter.length < 5", ng-repeat="tag in tags_filter")
                span.label.label-success(ng-click="toggleTag(tag)")
                  | {{ tag }}
                | &nbsp;
            span(ng-show="tags_filter.length >= 5")
                span.label.label-success
                  | {{ tags_filter.length }} tags
            span(ng-show="tags_filter.length > 0")
                span.label.label-danger(ng-click="tags_filter = []") x
          th(style="width:20%px;") Workers
      tr(ng-repeat='builder in builders | filter: isBuilderFiltered | orderBy: "name"')
          td(style="width:200px")
            a(ui-sref='builder({builder: builder.builderid})')
              | {{ builder.name }}
          td
            span(ng-repeat="build in builder.builds | orderBy : '-number' |limitTo: '15' ")
                a(ui-sref='build({builder: builder.builderid, build: build.number})')
                    span.badge-status(ng-class="results2class(build, 'pulse')")
                      | {{ build.number }}
          td(style="width:20%;")
            span(ng-repeat="tag in builder.tags")
                span.label(ng-click="toggleTag(tag)", ng-class="isTagFiltered(tag) ? 'label-success': 'label-default'")
                  | {{ tag }}
                | &nbsp;
          td(style="width:20%;")
            span(data-ng-repeat="worker in builder.workers")
                a(ui-sref='worker({worker: worker.workerid})')
                    span.badge-status(title="{{worker.name}}" ng-class="connected2class(worker, 'pulse')")
                        .badge-inactive {{worker.workerid}}
                        .badge-active {{worker.name}}
  .row
      .form-group
          label.checkbox-inline
              input(type="checkbox" name="{{settings.show_old_builders.name}}" ng-model="settings.show_old_builders.value")
              | {{settings.show_old_builders.caption}}
